<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>个人中心</title>
		<link rel="stylesheet" type="text/css" href="./Public/Home/css/style.css"/>
		<link rel="stylesheet" type="text/css" href="./Public/Home/css/personalsettings.css"/>
		<script type="text/javascript" src="Public/uploadify/jquery-1.8.2.min.js"></script>
		<script src="./Public/Home/js/jquery.easing.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="./Public/Home/js/index.js" type="text/javascript" charset="utf-8"></script>
		<script src="./Public/Home/js/personalsettings.js" type="text/javascript" charset="utf-8"></script>
		<!-- 引入uploadify所需插件 -->
		<script type="text/javascript" src="./Public/uploadify/jquery.uploadify.min.js"></script>
    	<link rel="stylesheet" type="text/css" href="./Public/uploadify/uploadify.css">
	</head>
	<body>
	{{include file='../Common/header'}}

	<!--主体部分-->
	<div id="Create_container">
			<!--左侧 我收到的简历-->
			 <div class="sidebar">
			 	<!--我收到的简历-->
			 	<dl class="company_center_aside">
			 		<dt>账号设置</dt>
			 		<dd class="active"><a href="settings.html">个人信息</a></dd>
			 		<!-- <dd><a href="{{U('Settings/email')}}">邮箱绑定</a></dd> -->
			 		<dd><a href="editpwd.html">修改密码</a></dd>
			 	</dl>
			 </div>
			<!--左侧 我收到的简历  结束-->

			 <!--中间主体内容-->
			 <div class="content">
			 	<dl class="c_section">
			 		<dt>
			 			<h1>
			 				<em></em>个人信息
			 			</h1>
			 		</dt>
			 		<dd>
			 			<div class="userinfo_tips">
			 				此信息用于站内的沟通、社区等功能，不会同步修改简历
			 			</div>
			 			<div class="userinfo_edit">
			 				<form action="" method="post">
			 					<!--上传头像-->
			 					<div class="avatar">
			 						<img src="{{$data['picture']?$data['picture']:'./Public/Home/image/myresume/default_headpic.png'}}" class="default_head"/>
									<img src="./Public/Home/image/myresume/shadow_tx.png" class="shadow"/>
									<input type="file" id="f" multiple="true"/>
										<script type="text/javascript">
									        $(function() {
									            $('#f').uploadify({
									                'formData'     : {//POST数据
									                    '<?php echo session_name();?>' : '<?php echo session_id();?>',
									                },
									                'fileTypeExts' : '*.jpg;*.png',
									                'swf'      : '{{__PUBLIC__}}/uploadify/uploadify.swf',
									                'uploader' : '{{U('upload')}}',//指定服务器上传的方法
									                'buttonText':'',
									                'fileSizeLimit' : '2000KB',
									                'uploadLimit' : 1,//上传文件数
									                'width':80,
									                'height':80,
									                'successTimeout':10,//等待服务器响应时间
									                'removeTimeout' : 0.2,//成功显示时间
									                'onUploadSuccess' : function(file, data, response) {
									                    //把php返回的数据转为json
									                    data=$.parseJSON(data);
									                    //获得图片地址
									                    var imageUrl = data.url;
									                    var li="<li>";
									                    li += "<img style='width:80px;height:80px;' src='"+imageUrl+"'/>";
									                    li += "<input type='hidden' name='picture' value='"+data.path+"'/><a href='javascript:;' id='self-close'>X</a>";
									                    li += "</li>";
									                    $("#uploadList ul").prepend(li);
									                }
									            });

												//关闭图片
									            var i = 1;
									            $('#self-close').live('click',function(){
									                $(this).parent('li').remove();
									                i++;
									                $('#f').uploadify('settings','uploadLimit',i);
									                var oldImg=$(this).siblings('input').val();
									                $.ajax({
									                	type:"post",
									                	url:"{{U('delUpload')}}",
									                	data:{oldImg:oldImg},
									                	success:function(data){

									                	}
									                });
									            })
									        });
									    </script>
									    <div id="uploadList">
									        <ul>

									        </ul>
									    </div>
			 					</div>
			 					<!--修改昵称-->
			 					<div class="username_box">
			 						<label>昵称</label>
			 						<input type="text" name="username" id="username" value="{{$data['username']}}" maxlength="15" />
			 					</div>
			 					<!--修改性别-->
			 					<div class="userinfo_sex">
			 						<span>性别</span>
			 						<input type="radio" name="sex" id="userinfoEditSexMale" value="男" {{if value="$data['sex'] eq '男' "}} checked="checked" {{endif}} />
			 						<label for="userinfoEditSexMale">男</label>
			 						<input type="radio" name="sex" id="userinfoEditSexFemale" value="女" {{if value="$data['sex'] eq '女' "}} checked="checked" {{endif}} />
			 						<label for="userinfoEditSexFemale">女</label>
			 					</div>
			 					<button>保存</button>
			 				</form>
			 			</div>
			 		</dd>
			 	</dl>
			 </div>
			 <!--中间主体内容 结束-->
		</div>


	<!--主体部分结束-->




	<!--回到顶部-->
	<a href="javascript:void(0);" id="back"></a>
	<!--回到顶部结束-->


	{{include file='../Common/footer'}}














	</body>
</html>

















